Skip to content

task: send G33 $1 moves when no F word was set - #4941

Open
grandixximo wants to merge 1 commit into
LinuxCNC:masterfrom
grandixximo:g33-spindle-select
Open

grandixximo wants to merge 1 commit into
LinuxCNC:masterfrom
grandixximo:g33-spindle-select

Conversation

@grandixximo

Copy link
Copy Markdown
Contributor

G33 ... $1 does not move the axis when no F word has been programmed. There is no error; the line just completes.

STRAIGHT_FEED drops a move with zero feed rate unless spindle sync is on, so that G33 runs with F still 0. The check read the sync flag of canon.spindle_num, which only G94/G95 set (spindle 0 in G94), while G33 $1 set the flag of spindle 1. STOP_SPEED_FEED_SYNCH likewise cleared the wrong spindle's flag. Spindle 0 and any program with an F word were not affected, which is probably why this went unnoticed.

Motion syncs one spindle at a time, so canon now keeps a single sync flag instead of one per spindle.

Testing

New test tests/motion/g33-spindle-select: two simulated spindles, M3 $1 S600, G33 Z-5 K1 $1 with no F word. On master Z stays at the start; with the fix it ends at -5 with spindle 1 turned the expected revolutions. A new test because the existing G33 tests load core_sim.hal, which has a single spindle. tests/motion, tests/interp, tests/remap and tests/trajectory-planner pass.

STRAIGHT_FEED drops a move with zero feed rate unless spindle sync is on, so G33 runs with F still 0. That check read the sync flag of canon.spindle_num, which only G94/G95 set (0 in G94), while G33 $1 set the flag of spindle 1. So G33 ... $1 with no F word programmed was dropped silently and the axis never moved. STOP_SPEED_FEED_SYNCH likewise cleared the wrong spindle's flag.

Motion syncs one spindle at a time, so canon keeps one flag instead of one per spindle.

tests/motion/g33-spindle-select runs G33 $1 on two simulated spindles with no F word; it fails on master with Z left at the start.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant